package com.gzs.learn.payment.model.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.gzs.learn.inf.annotation.Excel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 微信支付成功回调数据对象 pay_success_wechat
 *
 * @author guanzhisong
 * @date 2021-08-30
 */

@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
public class PaySuccessWechat implements Serializable{
    private static final long serialVersionUID = 1L;

    /** 微信支付流水号 */
    @TableId(value = "serial_wechat", type = IdType.INPUT)
    private String serialWechat;
    /** 支付流水号 */
    @Excel(name = "支付流水号")
    private Long serial;
    /** 随机字符串 */
    @Excel(name = "随机字符串")
    private String nonceStr;
    /** 支付总金额 */
    @Excel(name = "支付总金额")
    private Long total;
    /** 用户付款金额 */
    @Excel(name = "用户付款金额")
    private Long payerTotal;
    /** 币种 */
    @Excel(name = "币种")
    private String currency;
    /** 用户支付币种 */
    @Excel(name = "用户支付币种")
    private String payerCurrency;
    /** 附加数据 */
    @Excel(name = "附加数据")
    private String attach;
    /** 银行编码 */
    @Excel(name = "银行编码")
    private String bankType;
    /** 用户OPENID */
    @Excel(name = "用户OPENID")
    private String openid;
    /** 设备ID */
    @Excel(name = "设备ID")
    private String deviceId;
    /** 支付时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date successTime;
    /** 交易状态 */
    @Excel(name = "交易状态")
    private String tradeState;
    /** 交易类型 */
    @Excel(name = "交易类型")
    private String tradeType;
    /** 微信促销信息 */
    private List<PaySuccessWechatPromotion> promotions;
    /** 创建时间 */
    private Date createTime;
}
